# 导包
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
# 创建浏览器对象
driver = webdriver.Firefox()
# 打开tmooc登录页
url = 'https://uc.tmooc.cn/login/jumpTologin'
driver.get(url)
# 定位用户名输入值，定位密码框输入值，点击登录按钮
driver.find_element(By.ID, 'js_account_pm').send_keys('admin@qq.com')
driver.find_element(By.ID, 'js_password').send_keys('123456')
sleep(3)
driver.find_element(By.ID, 'js_submit_login').click()
# 停顿3秒，关闭浏览器驱动
sleep(3)
driver.quit()